package com.cmii.sjw.department.control.jsc.controller;

import com.cmii.sjw.department.control.jsc.model.KPIData;
import com.cmii.sjw.department.control.jsc.service.EduIndicatorsService;
import com.cmii.sjw.department.control.jsc.util.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

/**
 * 教育指标明细Controller
 *
 * @author lizheng
 * @date 2024-11-13
 */
@RestController
@CrossOrigin
@RequestMapping("/indicators")
public class EduIndicatorsController {

    @Resource
    private EduIndicatorsService eduIndicatorsService;

    /**
     * 教育指标明细
     * @return 获取json数据
     */
    @PostMapping("/getData")
    public Result<KPIData> getData() {
        KPIData data = eduIndicatorsService.getData();
        return Result.success(data);
    }
}
